package com.tp.test.controller;


import com.tp.test.model.UserInfo;
import com.tp.test.service.IUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.websocket.server.PathParam;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 乔亚涛
 * @since 2021-11-15
 */
@Controller
@RequestMapping("/userInfo")
public class UserInfoController {
    @Autowired
    private IUserInfoService userInfoService;

    @RequestMapping(value = "/addUserInfo/{userId}")
    @ResponseBody
    public void addUserInfo(@PathVariable("userId") String userId){
        UserInfo userInfo = new UserInfo();

        userInfo.setUserId(userId);

        userInfoService.insert(userInfo);
    }

}

